home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-29 | 40.0 KB | 1,298 lines |
- Newsgroups: comp.sources.misc
- From: dvadura@plg.waterloo.edu (Dennis Vadura)
- Subject: v27i113: dmake - dmake Version 3.8, Part12/41
- Message-ID: <1992Jan28.031535.7499@sparky.imd.sterling.com>
- X-Md4-Signature: c749321fc726d50296b783d5732c480d
- Date: Tue, 28 Jan 1992 03:15:35 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
- Posting-number: Volume 27, Issue 113
- Archive-name: dmake/part12
- Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
- Supersedes: dmake: Volume 19, Issue 22-58
-
- ---- Cut Here and feed the following to sh ----
- # this is dmake.shar.12 (part 12 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file dmake/mac/ruletab.c continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 12; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test -f _shar_wnt_.tmp; then
- sed 's/^X//' << 'SHAR_EOF' >> 'dmake/mac/ruletab.c' &&
- --
- -- LOG
- -- $Log: ruletab.c,v $
- X * Revision 1.1 1992/01/24 03:29:49 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- /* These are control macros for dmake that MUST be defined at some point
- X * if they are NOT dmake will not work! These are default definitions. They
- X * may be overridden inside the .STARTUP makefile, they are here
- X * strictly so that dmake can parse the STARTUP makefile */
- X
- static char *_rules[] = {
- X "MAXLINELENGTH := 4094",
- X "MAXPROCESSLIMIT := 1",
- X "MAXPROCESS := 1",
- X ".IMPORT .IGNORE: MPW DMSTARTUPDIR",
- X ".MAKEFILES : makefile.mk makefile",
- X ".SOURCE : .NULL",
- #include "startup.h"
- X 0 };
- X
- char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
- X
- SHAR_EOF
- chmod 0640 dmake/mac/ruletab.c ||
- echo 'restore of dmake/mac/ruletab.c failed'
- Wc_c="`wc -c < 'dmake/mac/ruletab.c'`"
- test 1989 -eq "$Wc_c" ||
- echo 'dmake/mac/ruletab.c: original size 1989, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/mac/startup.h ==============
- if test -f 'dmake/mac/startup.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/mac/startup.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/mac/startup.h' &&
- /* This file contains the default value of the DMMAKESTARTUP variable.
- X * You must set the quoted string below to the default path to the startup
- X * variable, so that it gets compiled in. LEAVE DMSTARTUPDIR in
- X * the path. This allows the user to customize his environment for dmake
- X * by setting up a new DMSTARTUPDIR environment variable. */
- X
- "MAKESTARTUP := $(MPW)tools:$(DMSTARTUPDIR)startup.mk",
- SHAR_EOF
- chmod 0640 dmake/mac/startup.h ||
- echo 'restore of dmake/mac/startup.h failed'
- Wc_c="`wc -c < 'dmake/mac/startup.h'`"
- test 403 -eq "$Wc_c" ||
- echo 'dmake/mac/startup.h: original size 403, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/mac/startup.mk ==============
- if test -f 'dmake/mac/startup.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/mac/startup.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/mac/startup.mk' &&
- # MPW Mac startup file. Customize to suit your needs.
- # Assumes MPW C. Change as req'd.
- # See the documentation for a description of internally defined macros.
- #
- # Disable warnings for macros redefined here that were given
- # on the command line.
- __.SILENT := $(.SILENT)
- .SILENT := yes
- X
- # Configuration parameters for DMAKE startup.mk file
- # Set these to NON-NULL if you wish to turn the parameter on.
- _HAVE_RCS := yes # yes => RCS is installed.
- _HAVE_SCCS := # yes => SCCS is installed.
- X
- # Applicable suffix definitions
- A := .lib # Libraries
- C := .c # C
- E := # Executables
- F := .f # Fortran
- O := .c.o # Object files: Assume they are created from C files
- P := .p # Pascal
- S := .a # Assembler sources
- V := v # RCS suffix
- X
- # See if these are defined
- TMPDIR := $(MPW)/tmp
- .IMPORT .IGNORE : TMPDIR
- .IMPORT .IGNORE : CLibraries Libraries
- X
- # Set arguments for the SHELL. Since we can't execute sub-processes,
- # these variables are not important, except for some makefiles that check
- # for some values to determine the platform.
- SHELL := mpw
- SHELLFLAGS :=
- GROUPFLAGS :=
- SHELLMETAS :=
- GROUPSUFFIX :=
- DIVFILE = $(TMPFILE)
- X
- # Standard C-language command names and flags
- X CC := c # C-compiler and flags
- X CFLAGS +=
- X
- X AS := asm # Assembler and flags
- X ASFLAGS +=
- X
- X LD = link # Loader and flags
- X LDFLAGS +=
- X LDLIBS = "$(CLibraries)CSANELib.o" "$(CLibraries)Math.o" \
- X "$(CLibraries)StdCLib.o" "$(Libraries)Runtime.o" \
- X "$(Libraries)Interface.o" "$(Libraries)Toollibs.o"
- X
- # Definition of $(MAKE) macro for recursive makes.
- X MAKE = $(MAKECMD) $(MFLAGS)
- X
- # Language and Parser generation Tools and their flags
- X YACC := yacc # standard yacc
- X YFLAGS +=
- X YTAB := ytab # yacc output files name stem.
- X
- X LEX := lex # standard lex
- X LFLAGS +=
- X LEXYY := lex_yy # lex output file
- X
- # Other Compilers, Tools and their flags
- X PC := any_pc # pascal compiler
- X RC := anyf77 # ratfor compiler
- X FC := anyf77 # fortran compiler
- X
- X CO := co # check out for RCS
- X COFLAGS += -q
- X
- X RM := delete # remove a file command
- X RMFLAGS +=
- X
- # Implicit generation rules for making inferences.
- # We don't provide .yr or .ye rules here. They're obsolete.
- # Rules for making *$O
- X %$C.o : %$C ; $(CC) $(CFLAGS) -c $<
- X %$P.o : %$P ; $(PC) $(PFLAGS) -c $<
- X %$S.o : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
- X %$F.o : %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
- X
- # Executables rules should go here. However, on the Mac, there is not
- # executable suffix (such as ".exe") and thus we end up with rules like
- # "% : %.c.o", which cause circular-dependency errors. Thus, it's easier
- # just to avoid specifiying any default rule for executables.
- X
- # lex and yacc rules
- X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
- X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
- X
- # RCS support
- .IF $(_HAVE_RCS)
- X % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
- X .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
- .END
- X
- # SCCS support
- .IF $(_HAVE_SCCS)
- X % : s.% ; get $@
- X .NOINFER : s.%
- .END
- X
- # DMAKE uses this recipe to remove intermediate targets
- .REMOVE :; $(RM) $<
- X
- # AUGMAKE extensions for SYSV compatibility
- @B = $(@:b)
- @D = $(@:d)
- @F = $(@:f)
- "*B" = $(*:b)
- "*D" = $(*:d)
- "*F" = $(*:f)
- <B = $(<:b)
- <D = $(<:d)
- <F = $(<:f)
- ?B = $(?:b)
- ?F = $(?:f)
- ?D = $(?:d)
- X
- # Turn warnings back to previous setting.
- .SILENT := $(__.SILENT)
- X
- # Local init file if any, gets parsed before user makefile
- .INCLUDE .IGNORE: "_startup.mk"
- SHAR_EOF
- chmod 0640 dmake/mac/startup.mk ||
- echo 'restore of dmake/mac/startup.mk failed'
- Wc_c="`wc -c < 'dmake/mac/startup.mk'`"
- test 3508 -eq "$Wc_c" ||
- echo 'dmake/mac/startup.mk: original size 3508, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/mac/sysintf.h ==============
- if test -f 'dmake/mac/sysintf.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/mac/sysintf.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/mac/sysintf.h' &&
- /*
- ** assorted bits of system interface, for common routines inside dmake.
- ** System specific code can be found in the config.h files for each
- ** of the system specifications.
- */
- #define STAT stat
- #define VOID_LCACHE(l,m)
- #define Hook_std_writes(A)
- #define GETPID 1
- X
- /*
- ** standard C items
- */
- X
- /*
- ** Mac interface standard items
- */
- #define getswitchar() '-'
- X
- /*
- ** make parameters
- */
- #define MAX_PATH_LEN 1024
- SHAR_EOF
- chmod 0640 dmake/mac/sysintf.h ||
- echo 'restore of dmake/mac/sysintf.h failed'
- Wc_c="`wc -c < 'dmake/mac/sysintf.h'`"
- test 415 -eq "$Wc_c" ||
- echo 'dmake/mac/sysintf.h: original size 415, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/mac/tempnam.c ==============
- if test -f 'dmake/mac/tempnam.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/mac/tempnam.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/mac/tempnam.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/mac/tempnam.c,v 1.1 1992/01/24 03:29:52 dvadura Exp $
- -- SYNOPSIS -- Fake tempnam function for the mac
- --
- -- DESCRIPTION
- -- Get a temporary file name.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: tempnam.c,v $
- X * Revision 1.1 1992/01/24 03:29:52 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- X
- #include "extern.h"
- #include <StdIO.h>
- #include <String.h>
- X
- X
- X
- /*
- X * Try to open a temporary file in the given directory (if non-NULL)
- X * with the given prefix (if non-NULL).
- X *
- X * We ignore the directory argument.
- X */
- PUBLIC char *tempnam (char * /* pDir */, char * pPrefix) {
- X char *pName;
- X char *pFullName;
- X
- X pName = tmpnam ((char *) NULL);
- X
- X /* Assume that if the name returned by tmpnam is not being used,
- X the name with the prefix is also not being used. */
- X pFullName = MALLOC (((pPrefix != NULL) ? strlen (pPrefix) : 0) +
- X strlen (pName) + 1, char);
- X
- X /* Copy in the name if we successfully allocated space for it. */
- X if (pFullName != NULL) {
- X if (pPrefix != NULL) {
- X strcpy (pFullName, pPrefix);
- X } else {
- X *pFullName = '\0';
- X } /* if ... else */
- X
- X strcat (pFullName, pName);
- X } /* if */
- X
- X return (pFullName);
- } /* PUBLIC char *tempnam () */
- SHAR_EOF
- chmod 0640 dmake/mac/tempnam.c ||
- echo 'restore of dmake/mac/tempnam.c failed'
- Wc_c="`wc -c < 'dmake/mac/tempnam.c'`"
- test 2283 -eq "$Wc_c" ||
- echo 'dmake/mac/tempnam.c: original size 2283, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/mac/tomacfil.c ==============
- if test -f 'dmake/mac/tomacfil.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/mac/tomacfil.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/mac/tomacfil.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/mac/tomacfil.c,v 1.1 1992/01/24 03:29:53 dvadura Exp $
- -- SYNOPSIS -- Routines to change unix file names to mac file names
- --
- -- DESCRIPTION
- -- Dmake sometimes assumes that files have '/' as a directory parameter in some makefiles.
- -- This works, even on DOS, but not on the Mac. In fact, on the Mac, you can't even do a
- -- a simple switch of ':' for '/' because all other the Mac has decided to reverse the use
- -- of a first-character directory delimiter to mean a relative path rather than absolute path.
- -- (i.e., ':test:b' means directory test is relative to the current directory, rather than
- -- a top-level directory. Thus, this file attempts to do the directory conversion behind
- -- the back of the rest of the program.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: tomacfil.c,v $
- X * Revision 1.1 1992/01/24 03:29:53 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- int IsUnixFName (char *pFileName);
- X
- X
- X
- /*
- X * Convert a file that may be in unix format to mac format.
- X *
- X * The returned name is either the untouched pUnixName, or a static buffer.
- X */
- PUBLIC char *Unix2MacFName(char *pUnixName) {
- X static char MacName[256];
- X char *pCurMac;
- X
- X if (IsUnixFName (pUnixName)) {
- X if (strlen (pUnixName) + (*pUnixName == '/' ? -1 : 1) >= sizeof (MacName)) {
- X Fatal ("File name '%s' is too long and will cause a buffer overflow", pUnixName);
- X } /* if */
- X
- X /* Set up relative or absolute path */
- X pCurMac = MacName;
- X if (*pUnixName == '/') {
- X ++pUnixName;
- X } else {
- X *(pCurMac++) = ':';
- X } /* if ... else */
- X
- X /* Convert the rest of the name */
- X while (*pUnixName != '\0') {
- X if (*pUnixName == '/') {
- X *(pCurMac++) = ':';
- X pUnixName++;
- X
- X } else {
- X *(pCurMac++) = *(pUnixName++);
- X } /* if ... else */
- X } /* while */
- X
- X *pCurMac = '\0';
- X return (MacName);
- X
- X } else {
- X return (pUnixName);
- X } /* if ... else */
- } /* PUBLIC char *Unix2MacFName() */
- X
- X
- X
- /*
- X * Is this file name in UNIX format?
- X * (We assume it is if there are any slashes in its name.)
- X */
- int IsUnixFName (char *pFileName) {
- X
- X for ( ; *pFileName != '\0'; ++pFileName) {
- X if (*pFileName == '/') {
- X return (TRUE);
- X } /* if */
- X } /* while */
- X
- X return (FALSE);
- } /* int IsUnixFName () */
- X
- X
- X
- /*
- X * Call the real fopen() from this override of the function
- X * that the rest of the program uses.
- X */
- #undef fopen
- PUBLIC FILE *MacFOpen (char *pFName, char *pMode) {
- X return (fopen (Unix2MacFName (pFName), pMode));
- } /* PUBLIC FILE *MacFOpen () */
- SHAR_EOF
- chmod 0640 dmake/mac/tomacfil.c ||
- echo 'restore of dmake/mac/tomacfil.c failed'
- Wc_c="`wc -c < 'dmake/mac/tomacfil.c'`"
- test 3703 -eq "$Wc_c" ||
- echo 'dmake/mac/tomacfil.c: original size 3703, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/macparse.c ==============
- if test -f 'dmake/macparse.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/macparse.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/macparse.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/macparse.c,v 1.1 1992/01/24 03:27:52 dvadura Exp $
- -- SYNOPSIS -- parse a macro definition
- --
- -- DESCRIPTION
- -- This file contains the code that parses a macro definition
- -- stored in a buffer. If the string in buffer is not a valid
- -- macro definition the routie Parse_macro returns 0, otherwise it
- -- returns 1 to indicate success.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: macparse.c,v $
- X * Revision 1.1 1992/01/24 03:27:52 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- PUBLIC int
- Parse_macro( buffer, flag )/*
- =============================
- X Parse the string in buffer and define it as a macro if it is a valid macro.
- X Note especially the string .SETDIR= since it is an attribute, but looks a
- X lot like a macro definition. This would not be a problem if make used
- X white space as token separators, since this is not the case we must do
- X something about it. */
- char *buffer;
- int flag;
- {
- X register char *tok1; /* temporary place to keep a token */
- X register char *tok2; /* temporary place to keep a token */
- X char *result; /* temporary pointer for strings */
- X TKSTR input; /* place to scan the buffer from */
- X HASHPTR hv; /* pointer to hash table value */
- X int operator; /* what macro operator do we have */
- X
- X DB_ENTER( "Parse_macro" );
- X
- X SET_TOKEN( &input, buffer );
- X tok1 = Get_token( &input, "=+:*", 0 );
- X
- X if( Macro_op( tok1 ) ) {
- X Error( "No macro name" );
- X CLEAR_TOKEN( &input );
- X DB_RETURN( 1 );
- X }
- X
- X tok1 = _strdup( tok1 );
- X tok2 = Get_token( &input, "=+:*", 2 );
- X if( !(operator = Macro_op(tok2)) ||
- X (!strcmp(tok1, ".SETDIR") &&
- X ((operator != M_OP_CL) || (operator != M_OP_PLCL) ||
- X (operator != M_OP_DFCL))) ) {
- X CLEAR_TOKEN( &input );
- X FREE( tok1 );
- X DB_RETURN( 0 );
- X }
- X
- X tok2 = Expand(tok1); FREE(tok1); tok1 = tok2;
- X tok2 = Get_token( &input, NIL( char ), FALSE );
- X
- X switch( operator ) {
- X case M_OP_PLCL:
- X tok2 = Expand( tok2 );
- X /* Fall thru */
- X
- X case M_OP_PL:
- X /* Add to an existing macro, if it is not defined, though, then
- X * just define a new macro */
- X
- X if( (hv = GET_MACRO(tok1)) == NIL(HASH) || hv->ht_value == NIL(char) )
- X Def_macro( tok1, tok2, flag );
- X else {
- X result = _stradd( hv->ht_value, tok2, FALSE );
- X Def_macro( tok1, result, flag );
- X FREE( result );
- X }
- X if( operator == M_OP_PLCL ) FREE(tok2);
- X break;
- X
- X case M_OP_DF:
- X if( (hv = GET_MACRO(tok1)) != NIL(HASH) )
- X break;
- X /* else FALLTHRU */
- X
- X case M_OP_EQ:
- X Def_macro( tok1, tok2, flag );
- X break;
- X
- X case M_OP_DFCL:
- X if( (hv = GET_MACRO(tok1)) != NIL(HASH) )
- X break;
- X /* else FALLTHRU */
- X
- X case M_OP_CL:
- X /* If the macro we are assigning from is a single control
- X * macro with nothing else, then we propagate the M_MULTI
- X * flag to the macro we are assigning the value to so that
- X * the same macro can be used to do this over and over. */
- X If_multi = 0;
- X tok2 = Expand( tok2 );
- X Def_macro( tok1, tok2, M_EXPANDED | flag | If_multi );
- X FREE( tok2 );
- X break;
- X }
- X
- X FREE( tok1 );
- X
- X DB_RETURN( 1 );
- }
- X
- X
- X
- PUBLIC int
- Macro_op( op )/*
- ================
- X Check the passed in op string and map it to one of the macro operators */
- char *op;
- {
- X int ret = 0;
- X
- X DB_ENTER( "macro_op" );
- X
- X switch( *op ) {
- X case '=': ret = M_OP_EQ; break;
- X case ':': ret = M_OP_CL; op++; break;
- X
- X case '+':
- X ret = M_OP_PL; op++;
- X if( *op == ':' ) { ret = M_OP_PLCL; op++; }
- X break;
- X
- X case '*':
- X ret = M_OP_DF; op++;
- X if( *op == ':' ) { ret = M_OP_DFCL; op++; }
- X break;
- X }
- X
- X if( *op++ != '=' )
- X ret = 0;
- X else if( *op != '\0' )
- X ret = 0;
- X
- X DB_RETURN( ret );
- }
- X
- SHAR_EOF
- chmod 0640 dmake/macparse.c ||
- echo 'restore of dmake/macparse.c failed'
- Wc_c="`wc -c < 'dmake/macparse.c'`"
- test 4782 -eq "$Wc_c" ||
- echo 'dmake/macparse.c: original size 4782, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/make.bat ==============
- if test -f 'dmake/make.bat' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/make.bat (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/make.bat' &&
- echo off
- cls
- rem *** This is the make batchfile that is used under MSDOS to make the
- rem *** first version of dmake. It isn't pretty but it does work, assuming
- rem *** the compilers have been correctly setup. See the warning below
- rem *** concerning tlink, if you are making the Turbo C version.
- rem
- X
- if %0%1 == %0 goto error
- if %1 == tcc goto mktcc
- if %1 == tccswp goto mktccswp
- if %1 == bcc goto mkbcc
- if %1 == bccswp goto mkbccswp
- if %1 == msc40 goto mkmsc40
- if %1 == msc40swp goto mkmsc40swp
- if %1 == msc50 goto mkmsc50
- if %1 == msc50swp goto mkmsc50swp
- if %1 == msc51 goto mkmsc51
- if %1 == msc51swp goto mkmsc51swp
- if %1 == msc60 goto mkmsc60
- if %1 == msc60swp goto mkmsc60swp
- if %1 == ztc goto mkztc
- if %1 == ztcswp goto mkztcswp
- X
- rem label the possible DOS variations for dmake here.
- :error
- echo MSDOS: You must specify 'make target' where target is one of:
- echo -------------
- echo tcc - Turbo C 2.0 compile.
- echo tccswp - Turbo C 2.0 compile of swapping dmake.
- echo bcc - Borland C++ 2.0 compile.
- echo bccswp - Borland C++ 2.0 compile of swapping dmake.
- echo msc40 - Microsoft C 4.0 compile.
- echo msc50 - Microsoft C 5.0 compile.
- echo msc51 - Microsoft C 5.1 compile.
- echo msc60 - Microsoft C 6.0 compile.
- echo msc40swp - Microsoft C 4.0, MASM 5.1 compile of swapping dmake.
- echo msc50swp - Microsoft C 5.0, MASM 5.1 compile of swapping dmake.
- echo msc51swp - Microsoft C 5.1, MASM 5.1 compile of swapping dmake.
- echo msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
- echo ztc - Zortech C++ 2.1 compile.
- echo ztcswp - Zortech C++ 2.1 compile of swapping dmake.
- goto end
- X
- rem This is the script that makes dmake using Microsoft C 4.0
- :mkmsc40
- msdos\mscdos\mk40.bat
- goto end
- X
- :mkmsc40swp
- msdos\mscdos\mk40swp.bat
- goto end
- X
- rem This is the script that makes dmake using Microsoft C 5.0
- :mkmsc50
- msdos\mscdos\mk50.bat
- goto end
- X
- :mkmsc50swp
- msdos\mscdos\mk50swp.bat
- goto end
- X
- rem This is the script that makes dmake using Microsoft C 5.1
- :mkmsc51
- msdos\mscdos\mk51.bat
- goto end
- X
- :mkmsc51swp
- msdos\mscdos\mk51swp.bat
- goto end
- X
- rem This is the script that makes dmake using Microsoft C 6.0
- :mkmsc60
- msdos\mscdos\mk60.bat
- goto end
- X
- :mkmsc60swp
- msdos\mscdos\mk60swp.bat
- goto end
- X
- rem This is the script that makes dmake using Zortech C++ 2.1
- :mkztc
- msdos\ztcdos\mk.bat
- goto end
- X
- :mkztcswp
- msdos\ztcdos\mkswp.bat
- goto end
- X
- rem This is the script that makes dmake using Turbo C 2.0 or higher.
- :mktcc
- cls
- echo WARNING:
- echo The default response files:
- echo msdos\tccdos\obj.rsp
- echo msdos\tccdos\lib.rsp
- echo contain absolute paths to TURBO-C runtime startup objects, and to
- echo the standard libraries. You should check that these files contain
- echo the correct path names for your installation of Turbo-C before
- echo proceeding further. Also check that the mkdir command at the start
- echo of the response file and the copy command at the end of the response
- echo file will work on your system.
- echo --
- echo Continue if ok, or abort and edit the response files.
- pause
- msdos\tccdos\mk.bat
- goto end
- X
- :mktccswp
- cls
- echo WARNING:
- echo The default response files:
- echo msdos\tccdos\objswp.rsp
- echo msdos\tccdos\libswp.rsp
- echo contain absolute paths to TURBO-C runtime startup objects, and to
- echo the standard libraries. You should check that these files contain
- echo the correct path names for your installation of Turbo-C before
- echo proceeding further. Also check that the mkdir command at the start
- echo of the response file and the copy command at the end of the response
- echo file will work on your system.
- echo --
- echo Continue if ok, or abort and edit the response files.
- pause
- msdos\tccdos\mkswp.bat
- goto end
- X
- rem This is the script that makes dmake using Turbo C++ 2.0.
- :mkbcc
- cls
- echo WARNING:
- echo The default response files:
- echo msdos\bccdos\obj.rsp
- echo msdos\bccdos\lib.rsp
- echo contain absolute paths to Borland C++ runtime startup objects, and to
- echo the standard libraries. You should check that these files contain
- echo the correct path names for your installation of Borland C++ before
- echo proceeding further. Also check that the mkdir command at the start
- echo of the response file and the copy command at the end of the response
- echo file will work on your system.
- echo --
- echo Continue if ok, or abort and edit the response files.
- pause
- msdos\bccdos\mk.bat
- goto end
- X
- :mkbccswp
- cls
- echo WARNING:
- echo The default response files:
- echo msdos\bccdos\objswp.rsp
- echo msdos\bccdos\libswp.rsp
- echo contain absolute paths to Borland C++ runtime startup objects, and to
- echo the standard libraries. You should check that these files contain
- echo the correct path names for your installation of Borland C++ before
- echo proceeding further. Also check that the mkdir command at the start
- echo of the response file and the copy command at the end of the response
- echo file will work on your system.
- echo --
- echo Continue if ok, or abort and edit the response files.
- pause
- msdos\bccdos\mkswp.bat
- goto end
- X
- rem All done!
- :end
- SHAR_EOF
- chmod 0640 dmake/make.bat ||
- echo 'restore of dmake/make.bat failed'
- Wc_c="`wc -c < 'dmake/make.bat'`"
- test 5188 -eq "$Wc_c" ||
- echo 'dmake/make.bat: original size 5188, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/make.c ==============
- if test -f 'dmake/make.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/make.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/make.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/make.c,v 1.1 1992/01/24 03:26:51 dvadura Exp $
- -- SYNOPSIS -- perform the update of all outdated targets.
- --
- -- DESCRIPTION
- -- This is where we traverse the make graph looking for targets that
- -- are out of date, and we try to infer how to make them if we can.
- -- The usual make macros are understood, as well as some new ones:
- --
- -- $$ - expands to $
- -- $@ - full target name
- -- $* - target name with no suffix, same as $(@:db)
- -- or, the value of % in % meta rule recipes
- -- $? - list of out of date prerequisites
- -- $< - all prerequisites associated with rules line
- -- $& - all prerequisites associated with target
- -- $> - library name for target (if any)
- -- $^ - out of date prerequisites taken from value of $<
- -- {{ - expands to {
- -- }} - expands to }
- -- \# - expands to #
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: make.c,v $
- X * Revision 1.1 1992/01/24 03:26:51 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- static void _drop_mac ANSI((HASHPTR));
- static void _set_recipe ANSI((char*, int));
- static void _set_tmd ANSI(());
- static void _append_file ANSI((STRINGPTR, FILE*, char*, int));
- static LINKPTR _dup_prq ANSI((LINKPTR));
- static char* _prefix ANSI((char *, char *));
- static char* _pool_lookup ANSI((char *));
- X
- #define RP_GPPROLOG 0
- #define RP_RECIPE 1
- #define RP_GPEPILOG 2
- #define NUM_RECIPES 3
- X
- static STRINGPTR _recipes[ NUM_RECIPES ];
- X
- X
- PUBLIC int
- Make_targets()/*
- ================
- X Actually go and make the targets on the target list */
- {
- X LINKPTR lp;
- X int done = 0;
- X
- X DB_ENTER( "Make_targets" );
- X
- X Read_state();
- X _set_recipe( ".GROUPPROLOG", RP_GPPROLOG );
- X _set_recipe( ".GROUPEPILOG", RP_GPEPILOG );
- X
- X Root->ce_flag |= F_RULES|F_TARGET|F_STAT;
- X Root->ce_attr |= A_NOSTATE;
- X Root->ce_time = Do_time();
- X TALLOC( Root->ce_recipe, 1, STRING );
- X Root->ce_recipe->st_string = "";
- X
- X for( lp = Root->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
- X lp->cl_prq->ce_attr |= A_ROOT;
- X
- X while( !done ) {
- X int rval;
- X
- X if( (rval = Make(Root, NIL(CELL))) == -1 )
- X DB_RETURN(1);
- X else
- X done = Root->ce_flag & F_MADE;
- X
- X if( !rval && !done ) Wait_for_child( FALSE, -1 );
- X }
- X
- X for( lp = Root->ce_prq; lp != NIL(LINK); lp = lp->cl_next ) {
- X CELLPTR root = lp->cl_prq;
- X if( !(root->ce_attr & A_UPDATED) )
- X printf( "`%s' is up to date\n", root->CE_NAME );
- X }
- X
- X DB_RETURN( 0 );
- }
- X
- X
- X
- int
- Make( cp, setdirroot )/*
- ======================== Make a specified target */
- CELLPTR cp;
- CELLPTR setdirroot;
- {
- X register LINKPTR dp;
- X register CELLPTR tcp;
- X CELLPTR nsetdirroot;
- X char *name, *lib;
- X HASHPTR m_at, m_q, m_b, m_g, m_l, m_bb, m_up;
- X char *all = NIL(char);
- X char *inf = NIL(char);
- X char *outall = NIL(char);
- X char *imm = NIL(char);
- X int rval = 0;
- X int push = 0;
- X int made = F_MADE;
- X int ignore;
- X time_t otime = (time_t) 1L;
- X time_t ttime = (time_t) 1L;
- X int mark_made = FALSE;
- X
- X DB_ENTER( "Make" );
- X DB_PRINT( "mem", ("%s:-> mem %ld", cp->CE_NAME, (long) coreleft()) );
- X
- X m_q = m_b = m_g = m_l = m_bb = m_up = m_at = NIL(HASH);
- X
- X /* If we are supposed to change directories for this target then do so.
- X * If we do change dir, then modify the setdirroot variable to reflect
- X * that fact for all of the prerequisites that we will be making. */
- X
- X nsetdirroot = setdirroot;
- X ignore = (((cp->ce_attr|Glob_attr)&A_IGNORE) != 0);
- X
- X if( cp->ce_attr & A_SETDIR ) {
- X /* Change directory only if the previous .SETDIR is a different
- X * directory from the current one. ie. all cells with the same .SETDIR
- X * attribute are assumed to come from the same directory. */
- X
- X if( (setdirroot == NIL(CELL) || setdirroot->ce_dir != cp->ce_dir) &&
- X (push = Push_dir(cp->ce_dir,cp->CE_NAME,ignore)) )
- X setdirroot = cp;
- X }
- X
- X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
- X if( cp->ce_recipe == NIL(STRING) ) {
- X char *dir = cp->ce_dir;
- X
- X if( Verbose & V_MAKE )
- X printf( "%s: Infering prerequisite(s) and recipe for [%s]\n", Pname,
- X cp->CE_NAME );
- X
- X Infer_recipe( cp, setdirroot );
- X
- X /* See if the directory has changed, if it has then make sure we
- X * push it. */
- X if( dir != cp->ce_dir ) {
- X if( push ) Pop_dir(FALSE);
- X push = Push_dir( cp->ce_dir, cp->CE_NAME, ignore );
- X setdirroot = cp;
- X }
- X }
- X
- X tcp = cp;
- X do {
- X if( push ) {
- X if( tcp->ce_dir ) FREE( tcp->ce_dir );
- X tcp->ce_dir = _pool_lookup(Pwd);
- X tcp->ce_attr |= A_SETDIR;
- X }
- X tcp->ce_setdir = nsetdirroot;
- X tcp = tcp->ce_all;
- X }
- X while( tcp != NIL(CELL) && tcp != cp );
- X
- X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
- X /* If we have not yet statted the target then do so. */
- X if( !(cp->ce_flag & F_STAT) && !(cp->ce_attr&A_PHONY) ) {
- X time_t itime = cp->ce_time;
- X Stat_target( cp, TRUE );
- X
- X if( cp->ce_time == (time_t)0L ) {
- X if( cp->ce_flag & F_INFER )
- X cp->ce_time = itime;
- X }
- X else
- X cp->ce_attr |= A_PRECIOUS; /* File exists so don't remove it later. */
- X
- X if( Verbose & V_MAKE )
- X printf("%s: Time stamp of [%s] is %ld\n",Pname,cp->CE_NAME,
- X cp->ce_time);
- X }
- X
- X DB_PRINT( "make", ("(%s, %ld, 0x%08x, 0x%04x)", cp->CE_NAME,
- X cp->ce_time, cp->ce_attr, cp->ce_flag) );
- X
- X if( !(cp->ce_flag & F_TARGET) && (cp->ce_time == (time_t) 0L) )
- X if( Makemkf ) {
- X rval = -1;
- X goto stop_making_it;
- X }
- X else if(cp->ce_prq != NIL(LINK)||(Augmake && (cp->ce_flag&F_EXPLICIT)))
- X /* Assume an empty recipe for a target that we have run inference on
- X * but do not have a set of rules for but for which we have inferred
- X * a list of prerequisites. */
- X cp->ce_flag |= F_RULES;
- X else
- X Fatal( "`%s' not found, and can't be made", cp->CE_NAME );
- X
- X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
- X
- X /* set value of $* if we have not infered a recipe, in this case $* is
- X * the same as $(@:db), this allows us to be compatible with BSD make */
- X if( cp->ce_per == NIL(char) ) cp->ce_per = "$(@:db)";
- X
- X for( dp = cp->ce_prq; dp != NIL(LINK); dp = dp->cl_next ) {
- X int seq;
- X
- X /* Make the prerequisite, note that if the current target has the
- X * .LIBRARY attribute set we pass on to the prerequisite the .LIBRARYM
- X * attribute and pass on the name of the current target as the library
- X * name, and we take it away when we are done. */
- X
- X tcp = dp->cl_prq;
- X seq = (((cp->ce_attr | Glob_attr) & A_SEQ) != 0);
- X
- X if( tcp->ce_flag & F_VISITED )
- X if( _explode_graph(tcp, dp, setdirroot) == 0 ) {
- X /* didn't blow it up so see if we need to wait for it. */
- X if( tcp->ce_flag & F_MADE ) {
- X if( tcp->ce_time > ttime ) ttime = tcp->ce_time;
- X continue;
- X }
- X else
- X goto stop_making_it;
- X }
- X else
- X tcp = dp->cl_prq;
- X
- X if( seq && !made ) goto stop_making_it;
- X
- X if( strchr(tcp->CE_NAME, '$') ) {
- X /* Make this prerequisite link point at the real prerequisite we
- X * are after, ie figure out what the dynamic one is and point at it. */
- X
- X m_at = Def_macro( "@", cp->ce_fname, M_MULTI );
- X name = Expand( tcp->CE_NAME );
- X if( strcmp(name,cp->CE_NAME) == 0 )
- X Fatal( "Circular dynamic dependency generated '%s'", name );
- X
- X tcp = dp->cl_prq = Def_cell( name );
- X FREE( name );
- X }
- X
- X if( cp->ce_attr & A_LIBRARY ) {
- X tcp->ce_attr |= A_LIBRARYM;
- X tcp->ce_lib = cp->ce_fname;
- X }
- X
- X if( (tcp->ce_flag & (F_INFER|F_STAT))==F_INFER && cp->ce_time >= ttime )
- X tcp->ce_time = cp->ce_time;
- X
- X /* Propagate parents F_REMOVE and F_INFER attribute to children.
- X * Make certain you do this AFTER propagating the time, since the
- X * time propagation test above uses the F_INFER flag to decide if
- X * it should do so. */
- X tcp->ce_flag |= cp->ce_flag & (F_REMOVE|F_INFER);
- X
- X rval |= Make(tcp, setdirroot);
- X
- X if( cp->ce_attr & A_LIBRARY )
- X tcp->ce_attr ^= A_LIBRARYM;
- X
- X if( rval == -1 || (seq && (rval==1)) )
- X goto stop_making_it;
- X
- X if( tcp->ce_time > ttime ) ttime = tcp->ce_time;
- X made &= tcp->ce_flag & F_MADE;
- X }
- X
- X
- X /* Do the loop again. We are most definitely going to make the current
- X * cell now. NOTE: doing this loop here also results in a reduction
- X * in peak memory usage by the algorithm. */
- X
- X for( dp = cp->ce_prq; dp != NIL(LINK); dp = dp->cl_next ) {
- X int tgflg;
- X tcp = dp->cl_prq;
- X name = tcp->ce_fname;
- X
- X /* make certain that all prerequisites are made prior to advancing. */
- X if( !(tcp->ce_flag & F_MADE) ) goto stop_making_it;
- X
- X /* If the target is a library, then check to make certain that a member
- X * is newer than an object file sitting on disk. If the disk version
- X * is newer then set the time stamps so that the archived member is
- X * replaced. */
- X if( cp->ce_attr & A_LIBRARY )
- X if( tcp->ce_time < cp->ce_time ) {
- X time_t mtime = Do_stat( name, tcp->ce_lib, NIL(char *) );
- X if( mtime < tcp->ce_time ) tcp->ce_time = cp->ce_time+1L;
- X }
- X
- X if( tcp->ce_time > otime ) otime = tcp->ce_time;
- X
- X all = _strapp( all, name );
- X if( tgflg = (dp->cl_flag & F_TARGET) ) inf = _strapp( inf, name );
- X
- X if((cp->ce_time<tcp->ce_time) || ((tcp->ce_flag & F_TARGET) && Force)) {
- X outall = _strapp( outall, name );
- X if( tgflg ) imm = _strapp( imm, name );
- X }
- X }
- X
- X DB_PRINT( "mem", ("%s:-C mem %ld", cp->CE_NAME, (long) coreleft()) );
- X DB_PRINT( "make", ("I make '%s' if %ld > %ld", cp->CE_NAME, otime,
- X cp->ce_time) );
- X
- X if( Verbose & V_MAKE && !(cp->ce_flag & F_MULTI) ) {
- X printf( "%s: >>>> Making ", Pname );
- X if( cp->ce_count != 0 )
- X printf( "[%s::{%d}]\n", cp->CE_NAME, cp->ce_count );
- X else
- X printf( "[%s]\n", cp->CE_NAME );
- X }
- X
- X m_at = Def_macro( "@", cp->ce_fname, M_MULTI|M_EXPANDED );
- X m_g = Def_macro( ">", cp->ce_lib, M_MULTI|M_EXPANDED );
- X m_q = Def_macro( "?", outall, M_MULTI|M_EXPANDED );
- X m_b = Def_macro( "<", inf, M_MULTI|M_EXPANDED );
- X m_l = Def_macro( "&", all, M_MULTI|M_EXPANDED );
- X m_up = Def_macro( "^", imm, M_MULTI|M_EXPANDED );
- X m_bb = Def_macro( "*", cp->ce_per, M_MULTI );
- X
- X _recipes[ RP_RECIPE ] = cp->ce_recipe;
- X
- X /* We attempt to make the target if
- X * 1. it has a newer prerequisite
- X * 2. It is a target and Force is set
- X * 3. It's set of recipe lines has changed.
- X */
- X if( Check_state(cp, _recipes, NUM_RECIPES )
- X || (cp->ce_time < otime)
- X || ((cp->ce_flag & F_TARGET) && Force)
- X ) {
- X
- X /* Only checking so stop as soon as we determine we will make something */
- X if( Check ) {
- X rval = -1;
- X goto stop_making_it;
- X }
- X
- X if( Verbose & V_MAKE )
- X printf( "%s: Updating [%s], (%ld > %ld)\n", Pname,
- X cp->CE_NAME, otime, cp->ce_time );
- X
- X if( Touch ) {
- X name = cp->ce_fname;
- X lib = cp->ce_lib;
- X
- X if( !(Glob_attr & A_SILENT) || !Trace )
- X if( lib == NIL(char) )
- X printf("touch(%s)", name );
- X else if( cp->ce_attr & A_SYMBOL )
- X printf("touch(%s((%s)))", lib, name );
- X else
- X printf("touch(%s(%s))", lib, name );
- X
- X if( !Trace )
- X if( Do_touch( name, lib,
- X (cp->ce_attr & A_SYMBOL) ? &name : NIL(char *) ) != 0 )
- X printf( " not touched - non-existant" );
- X
- X printf( "\n" );
- X Update_time_stamp( cp );
- X }
- X else if( cp->ce_recipe != NIL(STRING) ) {
- X if( !(cp->ce_flag & F_SINGLE) )
- X rval = Exec_commands( cp );
- X else {
- X TKSTR tk;
- X
- X _drop_mac( m_q );
- X
- X if( outall && *outall ) {
- X SET_TOKEN( &tk, outall );
- X
- X Doing_bang = TRUE;
- X name = Get_token( &tk, "", FALSE );
- X do {
- X m_q->ht_value = name;
- X
- X Wait_for_completion = TRUE; /* Reset in Exec_commands */
- X rval = Exec_commands( cp );
- X Unlink_temp_files(cp);
- X }
- X while( *(name = Get_token( &tk, "", FALSE )) != '\0' );
- X Doing_bang = FALSE;
- X }
- X
- X Update_time_stamp( cp );
- X m_q->ht_value = NIL(char);
- X }
- X }
- X else if( !(cp->ce_flag & F_RULES) && !(cp->ce_flag & F_STAT) &&
- X (!(cp->ce_attr & A_ROOT) || !(cp->ce_flag & F_EXPLICIT)) )
- X Fatal( "Don't know how to make `%s'",cp->CE_NAME );
- X else {
- X /* Empty recipe, set the flag as MADE and update the time stamp */
- X Update_time_stamp( cp );
- X }
- X }
- X else
- X mark_made = TRUE;
- X
- X /* Make sure everyone gets remade if Force is set */
- X tcp = cp;
- X do {
- X if( !(tcp->ce_flag & F_TARGET) && Force ) tcp->ce_time = Do_time();
- X if( mark_made ) {
- X tcp->ce_flag |= F_MADE;
- X if( tcp->ce_flag & F_MULTI ) {
- X LINKPTR dp;
- X for( dp = tcp->ce_prq; dp != NIL(LINK); dp = dp->cl_next )
- X tcp->ce_attr |= dp->cl_prq->ce_attr & A_UPDATED;
- SHAR_EOF
- true || echo 'restore of dmake/make.c failed'
- fi
- echo 'End of part 12, continue with part 13'
- echo 13 > _shar_seq_.tmp
- exit 0
- exit 0 # Just in case...
-